package usbcali.edu.persistencia.dto;

import usbcali.edu.persistencia.RHorariosReserva;

import usbcali.edu.presentation.backEndBeans.RHorariosReservaView;

import java.io.Serializable;

import java.util.Date;

import javax.faces.event.ActionEvent;


/**
*
*
* @author Zathura Code Generator http://code.google.com/p/zathura
*
*/
public class RHorariosReservaDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    private String consecutivo;
    private String Hini_hFin;
    private boolean rowSelected = false;
    private RHorariosReservaView rHorariosReservaView;
    private RHorariosReserva rHorariosReserva;

    public RHorariosReserva getRHorariosReserva() {
        return rHorariosReserva;
    }

    public String listener_update(ActionEvent e) {
        try {
            rHorariosReservaView.action_modifyWitDTO(((consecutivo == null) ||
                consecutivo.equals("")) ? null : new String(consecutivo),
                		((Hini_hFin == null) ||
                				Hini_hFin.equals("")) ? null : new String(Hini_hFin));
            rowSelected = !rowSelected;
        } catch (Exception ex) {
            return "";
        }

        return "";
    }

    public void listener_cancel(ActionEvent e) {
        consecutivo = rHorariosReserva.getConsecutivo().toString();
        rowSelected = !rowSelected;
    }

    /**
    * <p>Bound to commandLink actionListener in the ui that renders/unrenders
        * the Customer details for editing.</p>
        */
    public void toggleSelected(ActionEvent e) {
        consecutivo = rHorariosReserva.getConsecutivo().toString();
        rowSelected = !rowSelected;
    }

    public void setRHorariosReserva(RHorariosReserva rHorariosReserva) {
        this.rHorariosReserva = rHorariosReserva;
    }

    public RHorariosReservaView getRHorariosReservaView() {
        return rHorariosReservaView;
    }

    public void setRHorariosReservaView(
        RHorariosReservaView rHorariosReservaView) {
        this.rHorariosReservaView = rHorariosReservaView;
    }

    public String getConsecutivo() {
        return consecutivo;
    }

    public void setConsecutivo(String consecutivo) {
        this.consecutivo = consecutivo;
    }

    public boolean isRowSelected() {
        return rowSelected;
    }

    public void setRowSelected(boolean rowSelected) {
        this.rowSelected = rowSelected;
    }
}
